package cn.gson.fengboot.model.pojos;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Collection;
import java.util.Objects;

@Entity
public class Zreturnedmoney {
    private Integer returnedmoneyId;//回款计划ID
    private Zorder orderId;//订单
    private Zreturnedgood returgoodId;//退货单
    private TfyclientForm clientId;//客户
    private String returnedmoneyTheme;//回款计划主题
    private BigDecimal returnedmoneyMoney;//回款计划金额
    private String returnedmoneyPayment;//回款计划付款方式
    private Timestamp returnedmoneyTime;//回款计划日期
    private String returnedmoneyIssue;//回款计划期次
    private String returnedmoneyRetuen;//回款计划是否回款退款
    private String returnedmoneyOwner;//回款计划所有者
    private String returnedmoneyRefund;//回款计划是回款还是退款
    private String returnedmoneyBuck;//回款计划外币备注
    private BigDecimal returnedmoneyRate;//回款计划人民币汇率
    private String returnedmoneyRemark;//回款计划备注
    private Integer returnedmoneyZt;//回款计划状态

    @Id
    @Column(name = "returnedmoney_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "zreturnedmoney")
    public Integer getReturnedmoneyId() {
        return returnedmoneyId;
    }

    public void setReturnedmoneyId(Integer returnedmoneyId) {
        this.returnedmoneyId = returnedmoneyId;
    }

    @ManyToOne
    @JoinColumn(name = "order_id", referencedColumnName = "order_id")
    public Zorder getOrderId() {
        return orderId;
    }

    public void setOrderId(Zorder orderId) {
        this.orderId = orderId;
    }

    @ManyToOne
    @JoinColumn(name = "client_id", referencedColumnName = "client_id")
    public TfyclientForm getClientId() {
        return clientId;
    }

    public void setClientId(TfyclientForm clientId) {
        this.clientId = clientId;
    }

    @ManyToOne
    @JoinColumn(name = "returgood_id", referencedColumnName = "returgood_id")
    public Zreturnedgood getReturgoodId() {
        return returgoodId;
    }

    public void setReturgoodId(Zreturnedgood returgoodId) {
        this.returgoodId = returgoodId;
    }


    @Basic
    @Column(name = "returnedmoney_zt")
    public Integer getReturnedmoneyZt() {
        return returnedmoneyZt;
    }

    public void setReturnedmoneyZt(Integer returnedmoneyZt) {
        this.returnedmoneyZt = returnedmoneyZt;
    }

    @Basic
    @Column(name = "returnedmoney_theme")
    public String getReturnedmoneyTheme() {
        return returnedmoneyTheme;
    }

    public void setReturnedmoneyTheme(String returnedmoneyTheme) {
        this.returnedmoneyTheme = returnedmoneyTheme;
    }

    @Basic
    @Column(name = "returnedmoney_money")
    public BigDecimal getReturnedmoneyMoney() {
        return returnedmoneyMoney;
    }

    public void setReturnedmoneyMoney(BigDecimal returnedmoneyMoney) {
        this.returnedmoneyMoney = returnedmoneyMoney;
    }

    @Basic
    @Column(name = "returnedmoney_time")
    public Timestamp getReturnedmoneyTime() {
        return returnedmoneyTime;
    }

    public void setReturnedmoneyTime(Timestamp returnedmoneyTime) {
        this.returnedmoneyTime = returnedmoneyTime;
    }

    @Basic
    @Column(name = "returnedmoney_issue")
    public String getReturnedmoneyIssue() {
        return returnedmoneyIssue;
    }

    public void setReturnedmoneyIssue(String returnedmoneyIssue) {
        this.returnedmoneyIssue = returnedmoneyIssue;
    }

    @Basic
    @Column(name = "returnedmoney_retuen")
    public String getReturnedmoneyRetuen() {
        return returnedmoneyRetuen;
    }

    public void setReturnedmoneyRetuen(String returnedmoneyRetuen) {
        this.returnedmoneyRetuen = returnedmoneyRetuen;
    }

    @Basic
    @Column(name = "returnedmoney_owner")
    public String getReturnedmoneyOwner() {
        return returnedmoneyOwner;
    }

    public void setReturnedmoneyOwner(String returnedmoneyOwner) {
        this.returnedmoneyOwner = returnedmoneyOwner;
    }

    @Basic
    @Column(name = "returnedmoney_payment")
    public String getReturnedmoneyPayment() {
        return returnedmoneyPayment;
    }

    public void setReturnedmoneyPayment(String returnedmoneyPayment) {
        this.returnedmoneyPayment = returnedmoneyPayment;
    }

    @Basic
    @Column(name = "returnedmoney_refund")
    public String getReturnedmoneyRefund() {
        return returnedmoneyRefund;
    }

    public void setReturnedmoneyRefund(String returnedmoneyRefund) {
        this.returnedmoneyRefund = returnedmoneyRefund;
    }

    @Basic
    @Column(name = "returnedmoney_buck")
    public String getReturnedmoneyBuck() {
        return returnedmoneyBuck;
    }

    public void setReturnedmoneyBuck(String returnedmoneyBuck) {
        this.returnedmoneyBuck = returnedmoneyBuck;
    }

    @Basic
    @Column(name = "returnedmoney_rate")
    public BigDecimal getReturnedmoneyRate() {
        return returnedmoneyRate;
    }

    public void setReturnedmoneyRate(BigDecimal returnedmoneyRate) {
        this.returnedmoneyRate = returnedmoneyRate;
    }

    @Basic
    @Column(name = "returnedmoney_remark")
    public String getReturnedmoneyRemark() {
        return returnedmoneyRemark;
    }

    public void setReturnedmoneyRemark(String returnedmoneyRemark) {
        this.returnedmoneyRemark = returnedmoneyRemark;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Zreturnedmoney that = (Zreturnedmoney) o;
        return returnedmoneyId == that.returnedmoneyId &&
                Objects.equals(orderId, that.orderId) &&
                Objects.equals(clientId, that.clientId) &&
                Objects.equals(returnedmoneyTheme, that.returnedmoneyTheme) &&
                Objects.equals(returnedmoneyMoney, that.returnedmoneyMoney) &&
                Objects.equals(returnedmoneyTime, that.returnedmoneyTime) &&
                Objects.equals(returnedmoneyIssue, that.returnedmoneyIssue) &&
                Objects.equals(returnedmoneyRetuen, that.returnedmoneyRetuen) &&
                Objects.equals(returnedmoneyOwner, that.returnedmoneyOwner) &&
                Objects.equals(returnedmoneyPayment, that.returnedmoneyPayment) &&
                Objects.equals(returnedmoneyRefund, that.returnedmoneyRefund) &&
                Objects.equals(returnedmoneyBuck, that.returnedmoneyBuck) &&
                Objects.equals(returnedmoneyRate, that.returnedmoneyRate) &&
                Objects.equals(returnedmoneyRemark, that.returnedmoneyRemark);
    }

    @Override
    public int hashCode() {
        return Objects.hash(returnedmoneyId, orderId, clientId, returnedmoneyTheme, returnedmoneyMoney, returnedmoneyTime, returnedmoneyIssue, returnedmoneyRetuen, returnedmoneyOwner, returnedmoneyPayment, returnedmoneyRefund, returnedmoneyBuck, returnedmoneyRate, returnedmoneyRemark);
    }

    @Override
    public String toString() {
        return "Zreturnedmoney{" +
                "returnedmoneyId=" + returnedmoneyId +
                ", orderId=" + orderId +
                ", returgoodId=" + returgoodId +
                ", clientId=" + clientId +
                ", returnedmoneyTheme='" + returnedmoneyTheme + '\'' +
                ", returnedmoneyMoney=" + returnedmoneyMoney +
                ", returnedmoneyPayment='" + returnedmoneyPayment + '\'' +
                ", returnedmoneyTime=" + returnedmoneyTime +
                ", returnedmoneyIssue='" + returnedmoneyIssue + '\'' +
                ", returnedmoneyRetuen='" + returnedmoneyRetuen + '\'' +
                ", returnedmoneyOwner='" + returnedmoneyOwner + '\'' +
                ", returnedmoneyRefund='" + returnedmoneyRefund + '\'' +
                ", returnedmoneyBuck='" + returnedmoneyBuck + '\'' +
                ", returnedmoneyRate=" + returnedmoneyRate +
                ", returnedmoneyRemark='" + returnedmoneyRemark + '\'' +
                ", returnedmoneyZt=" + returnedmoneyZt +
                '}';
    }
}
